﻿@namespace SE.PO.CInterface.Web.Pages.DB.Device
@using SE.PO.CInterface.Web.Clients
@using SE.PO.CInterface.Enums
@using SE.PO.CInterface.Web.Pages.DB.Components
@using System.ComponentModel.DataAnnotations
@inject DeviceClient Client
@inject INotificationService Notice

<Form
    Model="@Model"
    Style="margin-top: 8px;"
    OnFinish="OnFinish"
    OnFinishFailed="OnFinishFailed"
    @ref="@Form">
     <Row Gutter="24">
           <GridCol Span="12">
               <FormItem Label="下级SCID" LabelCol="_formItemLayout.LabelCol" WrapperCol="_formItemLayout.WrapperCol">
                    <Input Style="width: 220px;" Placeholder="SC编码，下级SCID" @bind-Value="@context.ScId"/>
               </FormItem>
           </GridCol>
           <GridCol Span="12">
               <FormItem Label="设备编号" LabelCol="_formItemLayout.LabelCol" WrapperCol="_formItemLayout.WrapperCol">
                    <Input Style="width: 220px;" Placeholder="设备编号 （5位字符，按联通B接口编码规则编制，联合主键）" Disabled="true" @bind-Value="@context.Id"/>
               </FormItem>
           </GridCol>
       </Row>
   
       <Row Gutter="24">
           <GridCol Span="12">
               <FormItem Label="监控单元资管编码" LabelCol="_formItemLayout.LabelCol" WrapperCol="_formItemLayout.WrapperCol">
                    <Input Style="width: 220px;" Placeholder="监控单元资管编码，Device在资源管理系统中的唯一编码" @bind-Value="@context.DevAssetId"/>
               </FormItem>
           </GridCol>
           <GridCol Span="12">
               <FormItem Required Label="站点" LabelCol="_formItemLayout.LabelCol" WrapperCol="_formItemLayout.WrapperCol">
                   <SelectSite Model="@Model" SiteId="@context.SiteId"></SelectSite>
               </FormItem>
           </GridCol>
       </Row>
   
       <Row Gutter="24">
           <GridCol Span="12">
               <FormItem Required Label="机房" LabelCol="_formItemLayout.LabelCol" WrapperCol="_formItemLayout.WrapperCol">
                   <SelectRoom Model="@Model" RoomId="@context.RoomId"></SelectRoom>
               </FormItem>
           </GridCol>
           <GridCol Span="12">
               <FormItem Required Label="监控单元编号" LabelCol="_formItemLayout.LabelCol" WrapperCol="_formItemLayout.WrapperCol">
                   <SelectSU Model="@Model" SuId="@context.SuId"></SelectSU>
               </FormItem>
           </GridCol>
       </Row>
   
       <Row Gutter="24">
           <GridCol Span="12">
               <FormItem Label="设备名称" LabelCol="_formItemLayout.LabelCol" WrapperCol="_formItemLayout.WrapperCol">
                    <Input Style="width: 220px;" Placeholder="设备名称" @bind-Value="@context.Equipment"/>
               </FormItem>
           </GridCol>
           <GridCol Span="12">
               <FormItem Label="设备描述" LabelCol="_formItemLayout.LabelCol" WrapperCol="_formItemLayout.WrapperCol">
                    <Input Style="width: 220px;" Placeholder="设备描述" @bind-Value="@context.DeviceDesc"/>
               </FormItem>
           </GridCol>
       </Row>
   
       <Row Gutter="24">
           <GridCol Span="12">
               <FormItem Label="设备类型" LabelCol="_formItemLayout.LabelCol" WrapperCol="_formItemLayout.WrapperCol">
                   <SelectDeviceType Model="@Model" DeviceType="@context.DeviceType" ></SelectDeviceType>
               </FormItem>
           </GridCol>
           <GridCol Span="12">
               <FormItem Label="顺序编号" LabelCol="_formItemLayout.LabelCol" WrapperCol="_formItemLayout.WrapperCol">
                    <Input Style="width: 220px;" Label="顺序编号" Disabled="true" @bind-Value="@context.DisplayOrder"/>
               </FormItem>
           </GridCol>
       </Row>
   
       <Row Gutter="24">
           <GridCol Span="12">
               <FormItem Label="生产厂家描述" LabelCol="_formItemLayout.LabelCol" WrapperCol="_formItemLayout.WrapperCol">
                    <Input Style="width: 220px;" Placeholder="生产厂家描述" @bind-Value="@context.Productor"/>
               </FormItem>
           </GridCol>
           <GridCol Span="12">
               <FormItem Label="协议版本描述" LabelCol="_formItemLayout.LabelCol" WrapperCol="_formItemLayout.WrapperCol">
                    <Input Style="width: 220px;" Placeholder="协议版本描述" @bind-Value="@context.Version"/>
               </FormItem>
           </GridCol>
       </Row>
   
       <Row Gutter="24">
           <GridCol Span="12">
               <FormItem Label="投入运行时间" LabelCol="_formItemLayout.LabelCol" WrapperCol="_formItemLayout.WrapperCol">
                    <Input Style="width: 220px;" Placeholder="投入运行时间" @bind-Value="@context.BeginRunTime"/>
               </FormItem>
           </GridCol>
           <GridCol Span="12">
               <FormItem Label="设备型号" LabelCol="_formItemLayout.LabelCol" WrapperCol="_formItemLayout.WrapperCol">
                    <Input Style="width: 220px;" Placeholder="设备型号" @bind-Value="@context.DeviceModel"/>
               </FormItem>
           </GridCol>
       </Row>
   
       <FormItem Label="资源工程状态" LabelCol="_formItemLayout.LabelCol" WrapperCol="_formItemLayout.WrapperCol">
           <EnumSelect TEnum="NeStatusType?" @bind-Value="@context.LocateNeStatus"/>
       </FormItem>
</Form>